home *** CD-ROM | disk | FTP | other *** search
Text File | 1992-04-27 | 974 b | 52 lines | [TEXT/MPS ] |
- #
- # ProcessVTables
- # Script to process C++ virtual tables built by CFront.
- #
- # by Patrick C. Beard
- #
- # Copyright © 1990, 91, 92 by Patrick C. Beard. All rights reserved.
- #
-
- Set Echo 0
-
- # scan the argument list.
-
- Set vtables ""
- Set vtoptions ""
- Set cpincludes ":"
-
- Loop
- Break if {#} == 0
- If "{1}" !~ /-≈/
- Set vtables "{1}"
- Shift 1
- continue
- Else if "{1}" =~ /-i/
- Shift 1
- Set cpincludes "{1}"
- Shift 1
- continue
- Else If "{1}" =~ /-≈/
- Set vtoptions "{1}"
- Shift 1
- continue
- End
- End
-
- # generate the C code for the virtual tables.
-
- CPlus -mf -c -vtbl1 "{vtables}" > __vtables__.c -i "{cpincludes}"
-
- # run the resulting code through filters that do what we want.
-
- filtertables "{options}" < __vtables__.c > __newvtables__.c
- fixtables "{options}" < __vtables__.c >> __newvtables__.c
-
- # compile the results and delete temporary files.
-
- C -b -w3 __newvtables__.c -o "{vtables}.o"
- delete __vtables__.c
- delete __newvtables__.c
-
- Unset vtables vtoptions cpincludes
-